package com.example.designsoft.mvpexercise;

import com.example.designsoft.basetest.BasePresenter;
import com.example.designsoft.mvptest.MvpListener;

/**
 * author : Gyk
 * time   : 2020/11/18
 * todo   :
 */
public class MvpExercisePresenter extends BasePresenter<MvpExerciseContract.ExerciseModel, MvpExerciseContract.ExerciseView> implements MvpExerciseContract.ExercisPresenter {


    @Override
    public void setResultData(String s) {

        MvpExerciseContract.ExerciseView exerciseView = getView();
        if (exerciseView == null) {
            return;
        }
        mModel.setResult(s, new MvpListener() {
            @Override
            public void onSuccess(String content) {
                exerciseView.setData(content);
            }

            @Override
            public void onError() {

            }
        });
    }
}
